package com.dev.common.util;

import com.dev.common.constant.Constant;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.HttpServletResponse;


/**
 * @author lsw
 * @version 1.0
 * @date 2015-4-19
 * @desc reponse工具类
 */
public class ResponseUtil {

	/**
	 * 输出字符
	 * 
	 * @param response
	 * @param str
	 * @throws IOException
	 */
	public static void outString(HttpServletResponse response, String str)
			throws IOException {
		response.setCharacterEncoding(Constant.ENCODE_UTF8);
		PrintWriter out = response.getWriter();
		out.print(str);
		out.flush();
		out.close();
	}
}
